In [1]:
using Plots
gr()


Out[1]:
Plots.GRBackend()

In [13]:
base03=parse(Colorant,"#002b36");
base02=parse(Colorant,"#073642");
base01=parse(Colorant,"#586e75");
base00=parse(Colorant,"#657b83");
base0=parse(Colorant,"#839496");
base1=parse(Colorant,"#839496");
base2=parse(Colorant,"#eee8d5");
base3=parse(Colorant,"#fdf6e3");

yellow=parse(Colorant,"#b58900");
orange=parse(Colorant,"#cb4b16");
red=parse(Colorant,"#dc322f");
magenta=parse(Colorant,"#d33682");
violet=parse(Colorant,"#6c71c4");
blue=parse(Colorant,"#268bd2");
cyan=parse(Colorant,"#3aa198");
green=parse(Colorant,"#859900");

display([base03, base02, base01,base00,base0,base1,base2,base3])
display([yellow,orange,red,magenta,violet,blue,cyan,magenta])


WARNING: imported binding for red overwritten in module Main
WARNING: imported binding for blue overwritten in module Main

1D Graphs


In [2]:
x=collect(0:.1:4π)
y=cos.(x)
plot(x,y)


Out[2]:
0.0 2.5 5.0 7.5 10.0 12.5 -0.5 0.0 0.5 1.0 y1

In [3]:
scatter(x,y)


Out[3]:
0 5 10 -1 0 1 y1

In [4]:
bar(x,y)


Out[4]:
0 5 10 -0.5 0.0 0.5 1.0 y1

In [5]:
plot(sin, x->sin(2x), 0, 2π)


Out[5]:
-0.5 0.0 0.5 -0.5 0.0 0.5 y1

In [6]:
# Note, hline(Real) doesn't work.   Must be hline(Array{Real})
plot(x,y)
hline!([1])
hline!([0,-1])
vline!(0:π:4π)


Out[6]:
0 5 10 -1.0 -0.5 0.0 0.5 1.0 y1 y2 y3 y4

2D Graphs


In [7]:
x2d=repmat(x,1,length(x))
y2d=repmat(transpose(x),length(x),1)
z2d=sin.(x2d).*sin.(y2d);

In [8]:
heatmap(x,x,z2d)


Out[8]:
0 5 10 0 5 10 - 1.00 - 0.75 - 0.50 - 0.25 0 0.25 0.50 0.75 1.00

The contour example from the website works, but any other thing I try with contour doesn't.

So... I'm leaving out a contour example.

Statistics Graphs


In [9]:
histogram(randn(100))


Out[9]:
-2 -1 0 1 2 0 2 4 6 8 10 y1

In [10]:
histogram2d(randn(1000),randn(1000))


WARNING: 
Out[10]:
-2 0 2 -2.5 0.0 2.5 0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0
Keyword argument match_dimensions not supported with Plots.GRBackend().  Choose from: Set(Symbol[:top_margin, :group, :inset_subplots, :background_color, :yforeground_color_text, :xguidefont, :seriesalpha, :seriescolor, :tickfont, :zlims, :colorbar, :zflip, :ticks, :linealpha, :overwrite_figure, :arrow, :normalize, :linestyle, :ytickfont, :xflip, :fillcolor, :bar_width, :background_color_inside, :bins, :zguide, :zforeground_color_text, :yscale, :weights, :xtickfont, :xguide, :markershape, :background_color_subplot, :fillalpha, :markerstrokewidth, :foreground_color_subplot, :foreground_color, :foreground_color_text, :x, :yerror, :yguidefont, :legend, :discrete_values, :grid, :ribbon, :xforeground_color_axis, :xdiscrete_values, :background_color_outside, :legendtitle, :size, :orientation, :projection, :markersize, :ydiscrete_values, :seriestype, :yflip, :quiver, :zticks, :markerstrokecolor, :fillrange, :xlims, :xforeground_color_border, :markercolor, :ylink, :levels, :color_palette, :zguidefont, :lims, :foreground_color_border, :xscale, :marker_z, :markerstrokealpha, :left_margin, :markeralpha, :annotations, :window_title, :foreground_color_axis, :zlink, :zscale, :smooth, :xticks, :y, :margin, :zdiscrete_values, :bottom_margin, :yforeground_color_border, :scale, :zforeground_color_border, :background_color_legend, :linecolor, :html_output_format, :foreground_color_legend, :title, :subplot_index, :flip, :z, :yforeground_color_axis, :foreground_color_grid, :linewidth, :xerror, :ylims, :ztickfont, :primary, :aspect_ratio, :xforeground_color_text, :show, :link, :legendfont, :subplot, :guidefont, :label, :guide, :yguide, :zforeground_color_axis, :layout, :polar, :right_margin, :xlink, :series_annotations, :yticks])

3D graphs


In [24]:
t=collect(0:0.01:8π)
x=cos.(t)
y=sin.(t)
z=t

plot(x,y,z)


Out[24]:
y1

In [29]:
scatter3d(randn(50),randn(50),randn(50))


Out[29]:
y1

Assorted


In [23]:
pie_names=["area 1","area 2"]
pie_fraction=[0.4,0.6]
pie(pie_names,pie_fraction)


Out[23]:
area 1 area 2

In [ ]: